<?php
/**
 * Created by PhpStorm.
 * User: linzh
 * Date: 7/22/17
 * Time: 1:55 PM
 */
use application\service\library\ShadowWorker;

$config = __DIR__ . '/../config/shadow.php';

$config = is_file($config) ? include $config : [
    8070 => ['L10870zh', 'aes-256-cfb'],
    8071 => ['L10871zh', 'aes-256-cfb'],
];

ini_set('display_errors', 'on');
// 检查扩展
if (!extension_loaded('pcntl') or !extension_loaded('posix')) exit("Please install pcntl/posix extension. See http://doc3.workerman.net/install/install.html\n");

# 服务引擎
require __DIR__ . '/../../wshore/engine.inc';

foreach ($config as $port => $item) {
    ShadowWorker::register((int)$port, $item[0]??'', $item[1]??'');
}
ShadowWorker::start();
